<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>destructuring</title>
</head>
<body>
<script>
    // 6、遍历map解构
    var map=new Map()
    map.set('id','007')
    map.set('name','zs')
    console.log(map)
    console.log(typeof map)
    // 取key和value
    for(let [key,value] of map){
        console.log(key+' is '+value)
    }
    // 只取key
    for(let [key] of map){
        console.log(key)
    }
    // 只取value 要提前加个， 因为是第二个值
    for(let [,value] of map){
        console.log(value)
    }


</script>
</body>
</html>